<link rel="stylesheet" href="/assets/css/m.css"/>
<div class="tpl-portlet-components" xmlns:th="http://www.thymeleaf.org">
    <div class="portlet-title">
        <div class="caption font-green bold">
            保存分类
        </div>
    </div>
    <div class="tpl-block ">
        <div class="am-g tpl-amazeui-form">
            <div class="am-u-sm-12 am-u-md-9">
                <form class="am-form am-form-horizontal" name="movieTypeForm">
                    <input type="hidden" name="typeId" th:value="${movieType==null?0:movieType.id}">
                    <div class="am-form-group">
                        <label for="movieTypeName" class="am-u-sm-3 am-form-label">电影类别 / MovieType</label>
                        <div class="am-u-sm-9">
                            <input type="text" id="movieTypeName" name="typeName" placeholder="电影类别"
                                   th:value="${movieType == null ? '动作' : movieType.typeName}">
                            <small>为类别设置一个名称吧</small>
                            <div class="span-exist-tip"><span class="label label-sm label-danger">类别已经存在!</span>
                            </div>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            <button type="button" onclick="saveMovieType()" class="am-btn am-btn-primary">保存分类
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

</div>
